import React, { Component } from 'react'
import axios from "axios"
export class Details extends Component {

    constructor(props) {
      super(props)
      this.state = {
      obj:{}
      }
    }
    componentDidMount() { 
      console.log(this)
      axios.get("/details",{       
        params:{
          id:this.props.match.params.id
        }
      }).then((res)=>{
        this.setState({
          obj:res.data 
        })
        console.log(res.data)
      })       
     }
     render() {
       const {obj}=this.state
    return (
      <div>
      <img src={obj.img} />
     {obj.wen}
      </div>
    )
  }
}

export default Details